<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <title>合同管理</title>
</head>
<body>
<form class="layui-form" action="">

    <div class="select common">
        <div class="select-con">
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">合同名称:</label>
                    <div class="layui-input-inline">
                        <input type="text" class="layui-input" id="productName" search-type="productName">
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">责任人:</label>
                    <div class="layui-input-inline">
                        <input type="text" class="layui-input" id="zrr" search-type="barcode">
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">合同状态:</label>
                    <div class="layui-input-inline">
                        <select search-type="htlx">
                            <option value="草稿">草稿</option>
                            <option value="会签">会签</option>
                            <option value="待生效">待生效</option>
                            <option value="履行">履行</option>
                            <option value="归档">归档</option>
                            <option value="作废">作废</option>
                            <option value="已变更">已变更</option>
                        </select>
                    </div>
                </div>
            </div>
            <div class="select-btn">
                <div class="layui-bg-green comquery " lay-event="search">查询</div>
                <div class="layui-bg-green comquery " lay-event="reset">重置</div>
            </div>
        </div>
    </div>
</form>

<div class="common-padding">
    <table class="layui-hide" id="testdome" lay-filter="testdome"></table>
</div>
</body>
<!-- 头部 -->
<script type="text/html" id="toolbarinter">
    <div class="layui-btn-container ">
        <button class="layui-btn  layui-btn-sm colors" lay-event="add"><i class="layui-icon"></i></i>添加</button>
        <button class="layui-btn  layui-btn-sm colors" lay-event="update"><i class="layui-icon"></i>编辑</button>
        <button class="layui-btn  layui-btn-sm colors" lay-event="delete"><i class="layui-icon"></i>删除</button>
    </div>
</script>

<!-- 里面的查看 -->
<script type="text/html" id="More">
    <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="detail">查看</a>
</script>
<script src="../../../js/module/jquery-3.4.1.min.js"></script>
<script>
    layui.config({
        base: '../../../js/module/'
    }).use(['Services', 'jquery'], function() {
        var $ = layui.jquery;

        var dataType = "htgl";
        var services = new layui.Services({
            baseURL: baseaip,
            tableId: "testdome",
            toolbar: "#toolbarinter",
            serachUrl: "dictionaries/query",
            getUrl: "dictionaries/get",
            delUrl: "dictionaries/delete",
            updUrl: "plant/updateNcpxx",
            saveUrl: "./dialog/Addcontract.html",
            deleteField: "id",
            dataType: dataType,
            parameter: {
                keyword: '',
                type: dataType
            },
            cols: [
                [{
                    type: 'checkbox',
                    fixed: 'left'
                }, {
                    field: 'htmc',
                    sort: true,
                    title: "合同名称",
                    templet: function(data) {
                        return (JSON.parse(data.context)).htmc
                    }
                }, {
                    field: 'barcode',
                    sort: true,
                    title: '合同类型',
                    templet: function(data) {

                        return (JSON.parse(data.context)).htlx
                    }
                }, {
                    field: 'productclass',
                    sort: true,
                    title: '合同编号',
                    templet: function(data) {
                        return (JSON.parse(data.context)).htbh
                    }
                }, {
                    field: 'approval',
                    sort: true,
                    title: '甲方',
                    templet: function(data) {

                        return JSON.parse(data.context).jf
                    }
                }, {
                    field: 'specifications',
                    sort: true,
                    title: '乙方',
                    templet: function(data) {

                        return (JSON.parse(data.context)).yf
                    }
                }, {
                    field: 'unit',
                    sort: true,
                    title: '资金流向',
                    templet: function(data) {

                        return (JSON.parse(data.context)).zjlx
                    }
                }, {
                    field: 'foodcreate_name',
                    sort: true,
                    title: '金额',
                    templet: function(data) {

                        return (JSON.parse(data.context)).je
                    }
                }, {
                    field: 'foodcode',
                    sort: true,
                    title: '合同状态',
                    templet: function(data) {
                        return (JSON.parse(data.context)).htzt
                    }
                }, {
                    field: 'foodcode',
                    sort: true,
                    title: '责任人',
                    templet: function(data) {
                        return (JSON.parse(data.context)).zrr
                    }
                },{
                    field: 'foodcode',
                    sort: true,
                    title: '签订时间',
                    templet: function(data) {
                        return (JSON.parse(data.context)).qdsj
                    }
                },{
                    field: 'foodcode',
                    sort: true,
                    title: '合同期限',
                    templet: function(data) {
                        return (JSON.parse(data.context)).htqx
                    }
                },{
                    field: 'foodcode',
                    sort: true,
                    title: '联系电话',
                    templet: function(data) {
                        return (JSON.parse(data.context)).lxdh
                    }
                }, ]
            ],
        });
    });
</script>

</html>